<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<%
	String path = request.getContextPath();
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>登录/注册</title>
<script type="text/javascript">  
    function dosubmit() {  
        var th = document.getElementById("form");  
        if (th.username.value == "") {  
            alert("用户名不能为空");  
            th.username.focus();  
            return;  
        }  
  
        if (th.pswd.value == "") {  
            alert("密码不能为空");  
            th.pswd.focus();  
            return;  
        }  
        
        th.action="<%=path%>/RegisterLoginAction";
		th.submit();
	}

</script>

</head>
<body>
	<form id="form" method="post">
		姓名: <input type="text" name="username"> <br /> 密码: <input
			type="password" name="pswd"> <br /> <input type="button"
			value="submit" onclick="javascript:dosubmit()" onblur="validate(this)">
	</form>
</body>
</html>